package com.sinosoft.controller;

import com.sinosoft.service.ActivitiService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * Created by oracle on 2017-03-12.
 */
@Controller
public class ActivitiController {
    @Autowired
    ActivitiService activitiService;

    @RequestMapping("/testActiviti")
    @ResponseBody
    public void testActiviti() {
        activitiService.testActivity();
    }

    @RequestMapping("startProccess")
    @ResponseBody
    public String proccess() {
        activitiService.startProccess();
        return "success";
    }

    @RequestMapping("handleproccess")
    @ResponseBody
    public String handleproccess() {
        activitiService.handleProccess();
        return "success";
    }

    @RequestMapping("history")
    @ResponseBody
    public String history() {
        activitiService.history();
        return "success";
    }

    @RequestMapping("isend")
    @ResponseBody
    public Boolean isend() {
        return activitiService.isend();

    }
}
